﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AssetTransfer.ascx.vb"
    Inherits="WebForm_AssetMaintain_Component_AssetTransfer" %>
<asp:ObjectDataSource ID="dbAssetDef" runat="server" SelectMethod="GetAssetType"
    TypeName="AssetManage.BBL.AssetBBL">
    <SelectParameters>
        <asp:Parameter DefaultValue="1" Name="kind" Type="String" />
        <asp:ControlParameter ControlID="hiDBName" DefaultValue="" Name="dbName" PropertyName="Value"
            Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="dbASSET1" runat="server" SelectMethod="GetAssetData1" TypeName="AssetManage.BBL.AssetBBL">
    <SelectParameters>
        <asp:ControlParameter ControlID="ddlassetdef_id" Name="assetdef_id" PropertyName="SelectedValue"
            Type="String" DefaultValue="0" />
        <asp:ControlParameter ControlID="txtasset_owner" Name="asset_owner" PropertyName="Text"
            Type="String" ConvertEmptyStringToNull="False" DefaultValue="" />
        <asp:ControlParameter ControlID="txtasset_serialNo" Name="asset_SerialNo" PropertyName="Text"
            Type="String" ConvertEmptyStringToNull="False" DefaultValue="" />
        <asp:ControlParameter ControlID="hiEmpty" Name="Dept" PropertyName="Value" Type="String"
            ConvertEmptyStringToNull="False" DefaultValue="" />
        <asp:ControlParameter ControlID="hiEmpty" Name="HouseID" PropertyName="Value" Type="String"
            ConvertEmptyStringToNull="False" DefaultValue="" />
        <asp:ControlParameter ControlID="hiEmpty" ConvertEmptyStringToNull="False" Name="MAC"
            PropertyName="Value" Type="String" />
        <asp:ControlParameter ControlID="hiEmpty" ConvertEmptyStringToNull="False" Name="ComputerName"
            PropertyName="Value" Type="String" />
        <asp:ControlParameter ControlID="hiEmpty" ConvertEmptyStringToNull="False" Name="IP"
            PropertyName="Value" Type="String" />
        <asp:ControlParameter ControlID="hiDBName" PropertyName="Value" Name="dbName" Type="String"
            ConvertEmptyStringToNull="False"></asp:ControlParameter>
              <asp:Parameter DefaultValue="Distributed" Name="asset_status" />
    </SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField ID="hiDBName" runat="server" />
<asp:HiddenField ID="hiEmpty" runat="server" />
<asp:ObjectDataSource ID="dbOAFactory" runat="server" SelectMethod="GetOAFactory"
    TypeName="AssetManage.BBL.AssetBBL">
    <SelectParameters>
        <asp:Parameter DefaultValue="0" Name="kind" Type="String" />
        <asp:ControlParameter ControlID="hiDBName" DefaultValue="" Name="dbName" PropertyName="Value"
            Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
<asp:Panel ID="panel1" runat="server" BackColor="#E7FEC2" BorderWidth="1" Width="1000px"
    ScrollBars="Auto">
    <table border="1">
        <tr>
            <td colspan="8" align="center">
                <asp:Label ID="lblTitle" runat="server" Font-Bold="True" Font-Size="24px" meta:resourcekey="lblTitle"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="lblAssetDef" runat="server" meta:resourcekey="lblAssetDef" 
                  ></asp:Label>
            </td>
            <td >
                <asp:DropDownList ID="ddlassetdef_id" runat="server" DataSourceID="dbAssetDef" DataTextField="name"
                    DataValueField="id" Width="120px" >
                </asp:DropDownList>
            </td>
            <td align="right">
                <asp:Label ID="lblAssetowner" runat="server" meta:resourcekey="lblAssetowner" 
                    ></asp:Label>
                &nbsp;
            </td>
            <td >
                <asp:TextBox ID="txtasset_owner" runat="server" Width="90px" ></asp:TextBox>
            </td>
            <td align="right">
                <asp:Label ID="lblAsset_SerialNo" runat="server" 
                    meta:resourcekey="lblAsset_SerialNo" ></asp:Label>
            </td>
            <td >
                <asp:TextBox ID="txtasset_serialNo" runat="server" Width="90px" ></asp:TextBox>
            </td>
            <td align="right">
                &nbsp;</td>
            <td >
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="lblNewOwner" runat="server" meta:resourcekey="lblNewOwner"></asp:Label>
</td>
            <td >
                <asp:TextBox ID="txtNewOwner" runat="server" Width="90px" ></asp:TextBox>
            </td>
            <td align="right">
              <asp:Label ID="lblNewUser2" runat="server" meta:resourcekey="lblNewUser2"></asp:Label>
            </td>
            <td >
                <asp:TextBox ID="txtNewUser2" runat="server" Width="90px" ></asp:TextBox>
            </td>
            <td align="right">
                <asp:Label ID="lblOtherUser" runat="server" meta:resourcekey="lblOtherUser"></asp:Label>
            </td>
            <td >
                <asp:TextBox ID="txtNewOtherUser" runat="server" Width="90px" ></asp:TextBox>
            </td>
            <td align="right">
                <asp:Label ID="lblStoreSite" runat="server" meta:resourcekey="lblSoreSite"></asp:Label>
            </td>
            <td >
                <asp:DropDownList ID="ddlFactory" runat="server" DataSourceID="dbOAFactory" 
                    DataTextField="name" DataValueField="id" Width="130px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td colspan="8" align="center" style="font-weight: 700">
                <asp:Button ID="btnPrevious" runat="server" meta:resourcekey="btnPrevious"></asp:Button>
                &nbsp;<asp:Button ID="btnQuery" runat="server" meta:resourcekey="btnQuery"  />
                &nbsp;<asp:Button ID="btnConfirm" runat="server" meta:resourcekey="btnConfirm" 
                    style="height: 21px" Visible="False" />
                &nbsp;<asp:Button ID="btnClose" runat="server" meta:resourcekey="btnClose" />
                &nbsp;
                <asp:Button ID="btnNext" runat="server" meta:resourcekey="btnNext" />
            </td>
        </tr>
        <tr>
            <td colspan="8" align="center">
                <TServerControl:TGridView ID="gvMain" runat="server" AllowHoverEffect="False" AllowHoverSelect="False"
                    AllowPaging="True" AutoGenerateColumns="False" DataSourceID="dbASSET1" ShowFooterWhenEmpty="False"
                    ShowHeaderWhenEmpty="True" SkinID="pager" TotalRowCount="0" Width="900px">
                    <Columns>
                        <asp:TemplateField meta:resourcekey="colMaintain">
                            <HeaderTemplate>
                                <asp:CheckBox ID="chkTransferHead" runat="server" AutoPostBack="True" meta:resourcekey="chkTransfer"
                                    OnCheckedChanged="chkTransferHead_CheckedChanged" />
                                <asp:CheckBox ID="chkReturnHead" runat="server" AutoPostBack="True" meta:resourcekey="chkReturn"
                                    OnCheckedChanged="chkReturnHead_CheckedChanged" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="chkTransfer" runat="server" meta:resourcekey="chkTransfer" 
                                    AutoPostBack="True" oncheckedchanged="chkTransfer_CheckedChanged" 
                                    ToolTip='<%# Bind("asset_serialNo") %>' />
                                <asp:CheckBox ID="chkReturn" runat="server" meta:resourcekey="chkReturn" 
                                    AutoPostBack="True" ToolTip='<%# Bind("asset_serialNo") %>' 
                                    oncheckedchanged="chkReturn_CheckedChanged" />
                            </ItemTemplate>
                            <ItemStyle Wrap="False" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="DefName" meta:resourcekey="colassetdef_id" />
                        <asp:BoundField DataField="asset_serialNo" meta:resourcekey="colasset_serialNo" />
                        <asp:BoundField DataField="ownerName" meta:resourcekey="colasset_owner" />
                        <asp:BoundField DataField="UseName" meta:resourcekey="colUser2" />
                        <asp:TemplateField  meta:resourcekey="colNewOwner">
                            <ItemTemplate>
                                <asp:TextBox ID="txtNewOwner" runat="server" Width="70px" ></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField meta:resourcekey="colNewUser2">
                            <ItemTemplate>
                                <asp:TextBox ID="txtNewUser2" runat="server" Width="70px" 
                                   ></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField meta:resourcekey="colNewOtherUser">
                            <ItemTemplate>
                                <asp:TextBox ID="txtNewOtherUser" runat="server" Width="70px" 
                                  ></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                         <asp:BoundField DataField="asset_owner"  />
                    </Columns>
                    <EmptyDataTemplate>
                        <asp:Label ID="lblEmpty" runat="server" ForeColor="Red" meta:resourcekey="lblEmpty"></asp:Label>
                    </EmptyDataTemplate>
                </TServerControl:TGridView>
            </td>
        </tr>
    </table>
</asp:Panel>
